<?php
class Users_model extends MY_Model{
	function __construct(){
		parent::__construct();
		$this->loadfields();
	}
	
	function login($username = null , $password = null){
		//echo "THIS-TABLE ::: ". $this->table();
		echo "USERNAME($username)    PASSWORD($password)";
		$this->db->where("username", $username);
		$this->db->where("password", $password);
		$this->db->where("valid", VALID);
		$result = $this->db->get($this->table());
		return $result->row_array();
		
	}
	
}